const CracoLessPlugin = require("craco-less");
const WebpackBar = require('webpackbar');
const path = require("path");
const pathResolve = pathUrl => path.join(__dirname, pathUrl);

module.exports = {
    webpack: {
        plugins: [
            new WebpackBar()
        ],
        alias: {
            "@@": pathResolve("."),
            "@": pathResolve("src"),
            "@assets": pathResolve("src/assets"),
            "@api": pathResolve("src/api"),
            "@components": pathResolve("src/components"),
            "@pages": pathResolve("src/pages"),
            "@utils": pathResolve("src/utils")
        },
    },
    plugins: [
        {
            plugin: CracoLessPlugin,
            options: {
                lessLoaderOptions: {
                    lessOptions: {
                        modifyVars: {},
                        javascriptEnabled: true,
                    },
                }
            },
        },
    ],
};
